package com.distranmove.common.exception;



/**
 * 自定义异常
 * 
 * @author ruoyi
 */
public class CustomException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    private Integer code;

    private String message;
    private Object data;

    public CustomException(String message)
    {
        this.message = message;
    }

    public CustomException(String message, Integer code)
    {
        this.message = message;
        this.code = code;
    }
    public CustomException(Object data, String message, Integer code)
    {

        this.data=data;
        this.message = message;
        this.code = code;
    }
    public CustomException(String message, Throwable e)
    {
        super(message, e);
        this.message = message;
    }
    public Object getData()
    {
        return data;
    }

    public void setData(Object data)
    {
        this.data = data;
    }
    @Override
    public String getMessage()
    {
        return message;
    }

    public Integer getCode()
    {
        return code;
    }
}
